﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace ArbolandiaBL
{
    public class Service
    {
        #region Subcategory
        //Catalogo Subcategory
        public List<Product_SubCategory> GetSubcategorys()
        {
            var res = new List<Product_SubCategory>();
            try
            {
                res = new SubcategoryProvider().GetSubcategorys();
            }
            catch (Exception ex)
            {
                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;

        }
        public List<Product_SubCategory> GetSubcategorys(int idcategory)
        {
            var res = new List<Product_SubCategory>();
            try
            {
                res = new SubcategoryProvider().GetSubcategorys(idcategory);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void DeleteSubCategory(int id)
        {
            try
            {
                new SubcategoryProvider().DeleteSubCategory(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }

        }
        public Product_SubCategory GetSubcategoryId(int id)
        {
            var res = new Product_SubCategory();
            try
            {
                res = new SubcategoryProvider().GetSubcategoryId(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void InsertUpdateSubCategory(Product_SubCategory cat)
        {
            try
            {
                new SubcategoryProvider().InsertUpdateSubCategory(cat);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }

        }
        public void InsertSubCategoryGroup(Product_SubCategoryGroup sub)
        {
            try
            {
                new SubcategoryProvider().InsertSubCategoryGroup(sub);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void InsertUpdateProductOnSubcategory(Product_SubCategoryGroup sub)
        {
            try
            {
                new SubcategoryProvider().InsertUpdateProductOnSubcategory(sub);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }

        }
        public Product_SubCategory GetSubcateforyForProduct(int idproduct)
        {
            var res = new Product_SubCategory();
            try
            {
                res = new SubcategoryProvider().GetSubcateforyForProduct(idproduct);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void DeleteSubCategoryGroup(int productid, int subcategoryid)
        {
            try
            {
                new SubcategoryProvider().DeleteSubCategoryGroup(productid, subcategoryid);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void InsertPictureSubcategory(Int32 subcategoryid, Guid guid, Picture picture, Guid guidthumb, Picture picturethumb)
        {
            try
            {
                new SubcategoryProvider().InsertPictureSubcategory(subcategoryid, guid, picture, guidthumb, picturethumb);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public object GetPictureSubcategory(Int32 subcategoryid)
        {
            var res = new Object();
            try
            {
                res = new SubcategoryProvider().GetPictureSubcategory(subcategoryid);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void DeletePictureSubcategory(Int32 subcategoryid)
        {
            try
            {
                new SubcategoryProvider().DeletePictureSubcategory(subcategoryid);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        #endregion Subcategory

        #region Products
        public List<object> GetProductsSimpleListBySubCategory(int idSubCategory)
        {
            var res = new List<object>();
            try
            {
                res = new ProductsProvider().GetProductsSimpleListBySubCategory(idSubCategory);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public List<ADProductSimple> GetAllProducts()
        {
            var res = new List<ADProductSimple>();
            try
            {
                res = new ProductsProvider().GetAllProducts();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public List<Product_Product> GetAllProductsFull()
        {
            var res = new List<Product_Product>();
            try
            {
                res = new ProductsProvider().GetAllProductsFull();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public List<object> GetAllProductsAdmin()
        {
            var res = new List<object>();
            try
            {
                res = new ProductsProvider().GetAllProductsAdmin();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void DeleteProduct(int productId, ObSession obSession)
        {
            try
            {
                new ProductsProvider(obSession, productId).DeleteProduct();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public Product_Product GetProductId(int id)
        {
            var res = new Product_Product();
            try
            {
                res = new ProductsProvider().GetProductId(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public int InsertUpdateProduct(Product_Product product, ObSession obSession)
        {
            var res = 0;
            try
            {
                res = new ProductsProvider().InsertUpdateProduct(product, obSession);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }

        public void DeleteProductDetail(int id, int productid)
        {
            try
            {
                new ProductsProvider().DeleteProductDetail(id, productid);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public List<Product_ProductDetail> GetProductDetailAll(int id)
        {
            return new ProductsProvider().GetProductDetailAll(id);

        }
        public void InsertUpdateProductDetail(Product_ProductDetail productDetail)
        {
            try
            {
                new ProductsProvider().InsertUpdateProductDetail(productDetail);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }


        public void InsertProductPicture(Picture small, Picture big, Product_ProductPictures pic)
        {
            try
            {
                new ProductsProvider().InsertProductPicture(small, big, pic);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void DeleteProductPicture(int id)
        {
            try
            {
                new ProductsProvider().DeleteProductPicture(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public List<object> GetProductPictures(int id)
        {
            var res = new List<object>();
            try
            {
                res = new ProductsProvider().GetProductPictures(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }

        public void InsertUpdateComplements(Product_ProductComplement productComplement)
        {
            try
            {
                new ProductsProvider().InsertUpdateComplements(productComplement);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void DeleteComplements(int id)
        {
            try
            {
                new ProductsProvider().DeleteComplements(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public List<object> GetComplements(Int32 id, bool isvarious)
        {
            var res = new List<object>();
            try
            {
                res = new ProductsProvider().GetComplements(id, isvarious);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }

        public void InsertUpdateProductPreferences(Product_ProductPreferenceGroup productPreferencegp)
        {
            try
            {
                new ProductsProvider().InsertUpdateProductPreferences(productPreferencegp);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void DeleteProductPreferences(int id)
        {
            try
            {
                new ProductsProvider().DeleteProductPreferences(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public List<object> GetProductPreferences(Int32 id)
        {
            var res = new List<object>();
            try
            {
                res = new ProductsProvider().GetProductPreferences(id);
            }
            catch (Exception ex)
            {
                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }

        public Int32 GetCountImagesProduct(Int32 productid)
        {
            var res = 0;
            try
            {
                res = new ProductsProvider().GetCountImagesProduct(productid);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }

        #endregion Products

        #region ProductsVarious
        public int InsertUpdateProductVarious(Product_ProductVarious product, ObSession obSession)
        {
            var res = 0;
            try
            {
                res = new ProductsVariousProvider().InsertUpdateProductVarious(product, obSession);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void DeleteProductVarious(int productId, ObSession obSession)
        {
            try
            {
                new ProductsVariousProvider(obSession, productId).DeleteProductVarious();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public List<object> GetAllProductsVarious()
        {
            List<object> res = new List<object>();
            try
            {
                res = new ProductsVariousProvider().GetAllProductsVarious();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public List<Product_ProductVarious> GetAllProductsVariousFull()
        {
            var res = new List<Product_ProductVarious>();
            try
            {
                res = new ProductsVariousProvider().GetAllProductsVariousFull();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public Product_ProductVarious GetProductVariousId(int id)
        {
            var res = new Product_ProductVarious();
            try
            {
                res = new ProductsVariousProvider().GetProductVariousId(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void InsertUpdateProductVariousDetail(Product_ProductDetail productDetail)
        {
            try
            {
                new ProductsVariousProvider().InsertUpdateProductVariousDetail(productDetail);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void DeleteProductVariousDetail(int productid)
        {
            try
            {
                new ProductsVariousProvider().DeleteProductVariousDetail(productid);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        #endregion ProductsVarious

        #region Category
        public List<Product_Category> GetCategorys()
        {
            var res = new List<Product_Category>();
            try
            {
                res = new CategoryProvider().GetCategorys();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void InsertUpdateCategory(Product_Category cat)
        {
            try
            {
                new CategoryProvider().InsertUpdateCategory(cat);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void DeleteCategory(int id)
        {
            try
            {
                new CategoryProvider().DeleteCategory(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public List<object> GetPictureCategory(Int32 categoryid)
        {
            var res = new List<object>();
            try
            {
                res = new CategoryProvider().GetPictureCategory(categoryid);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void InsertPictureCategory(Int32 categoryid, Guid guid, Picture picture)
        {
            try
            {
                new CategoryProvider().InsertPictureCategory(categoryid, guid, picture);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void DeletePictureCategory(Int32 categoryid)
        {
            try
            {
                new CategoryProvider().DeletePictureCategory(categoryid);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public Product_Category GetCategoryId(Int32 categoryid)
        {
            var res = new Product_Category();
            try
            {
                res = new CategoryProvider().GetCategoryId(categoryid);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        #endregion Category

        #region Preferences
        public List<Product_Preference> GetPreferences()
        {
            var res = new List<Product_Preference>();
            try
            {
                res = new PreferenceProvider().GetPreferences();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void InsertUpdatePreference(Product_Preference pp)
        {
            try
            {
                new PreferenceProvider().InsertUpdatePreference(pp);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void DeletePreference(int id)
        {
            try
            {
                new PreferenceProvider().DeletePreference(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public List<object> GetPicturePreference(Int32 id)
        {
            var res = new List<object>();
            try
            {
                res = new PreferenceProvider().GetPicturePreference(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void InsertPicturePreference(Int32 id, Guid guid, Picture picture)
        {
            try
            {
                new PreferenceProvider().InsertPicturePreference(id, guid, picture);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void DeletePicturePreference(Int32 id)
        {
            try
            {
                new PreferenceProvider().DeletePicturePreference(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public Product_Preference GetPreferenceId(Int32 id)
        {
            var res = new Product_Preference();
            try
            {
                res = new PreferenceProvider().GetPreferenceId(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        #endregion Preferences

        #region Banners
        public void InsertBanner(Guid guid, Picture picture, BannerType bt)
        {
            try
            {
                new BannerProvider(bt).InsertBanner(guid, picture);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void DeleteBanner(int id, BannerType bt)
        {
            try
            {
                new BannerProvider(bt).DeleteBanner(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public List<object> GetBanners(BannerType bt)
        {
            var res = new List<object>();
            try
            {
                res = new BannerProvider(bt).GetBanners();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;

        }

        #endregion Banners

        #region Color
        public List<CatColor> GetColors()
        {
            var res = new List<CatColor>();
            try
            {
                res = new ColorProvider().GetColors();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;

        }
        public void DeleteColor(Int32 id)
        {
            try
            {
                new ColorProvider().DeleteColor(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void InsertColor(CatColor cc)
        {
            try
            {
                new ColorProvider().InsertColor(cc);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }

        }
        #endregion Color

        #region Image
        public void SaveRezizeImage(string fullpath, Stream streamImage, Int32 height, Int32 width)
        {
            try
            {
                new ImageProvider().SaveRezizeImage(fullpath, streamImage, height, width);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        #endregion Image
        #region TipsJardin
        public List<Arb_TipsJardin> GetAllTipsJardin()
        {
            var res = new List<Arb_TipsJardin>();
            try
            {
                res = new TipsJardinProvider().GetAllTipsJardin();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;

        }
        public List<Arb_TipsJardin> GetAllTipsJardin(string category)
        {
            var res = new List<Arb_TipsJardin>();
            try
            {
                res = new TipsJardinProvider().GetAllTipsJardin(category);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public List<TipsJardinCategory> GetAllCategorysTipsJardin()
        {
            var res = new List<TipsJardinCategory>();
            try
            {
                res = new TipsJardinProvider().GetAllCategorysTipsJardin();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public Int32 GetTotalTipsJardin()
        {
            var res = 0;
            try
            {
                res = new TipsJardinProvider().GetTotalTipsJardin();
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void SaveTipJardin(Arb_TipsJardin tip)
        {
            try
            {
                new TipsJardinProvider().SaveTipJardin(tip);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void DeleteTipJardin(int id)
        {
            try
            {
                new TipsJardinProvider().DeleteTipJardin(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        #endregion TipsJardin

        #region ContentManager
        public void InsertContent(ContentManagement content)
        {
            try
            {
                new ContentManagementProvider().InsertContent(content);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void DeleteContent(int id)
        {
            try
            {
                new ContentManagementProvider().DeleteContent(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public List<ContentManagement> GetContents(int id)
        {
            var res = new List<ContentManagement>();
            try
            {
                res = new ContentManagementProvider().GetContents(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public ContentManagement GetContent(int id)
        {
            var res = new ContentManagement();
            try
            {
                res = new ContentManagementProvider().GetContent(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
            return res;
        }
        public void DeletePictureContent(int id)
        {
            try
            {
                new ContentManagementProvider().DeletePictureContent(id);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        public void InsertContentPicture(int id, Picture picture)
        {
            try
            {
                new ContentManagementProvider().InsertContentPicture(id, picture);
            }
            catch (Exception ex)
            {

                ArbolandiaBL.LogError.WriteError(ex, System.Reflection.MethodBase.GetCurrentMethod().Name);
            }
        }
        #endregion  ContentManager
    }
}
